package com.yckj.lawyermanager.dongao.mapper;

import com.yckj.lawyermanager.dongao.entity.Lawyer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 律师档案操作：创建、查询、修改、删除
 * @author Jing yaxian
 * @create 2023-01-02 16:42
 */
@Mapper
public interface LawyerMapper{
    /**
     * 修改律师
     * @param lawyer 律师对象：包含所有信息
     * @return 修改成功返回1；否则返回0
     */
    public int updateLawyer(Lawyer lawyer);
    /**
     * 按照律师编号查询
     * @param lawyerid 律师编号
     * @return 查询得到的律师对象
     */
    public Lawyer selectLawyerById(int lawyerid);

    /**
     * 按照编号删除
     * @param lawyerid 律师编号
     * @return 删除的编号
     */
    public int deleteLawyer(int lawyerid);
    /**
     * 查询所有律师
     * @return 律师集合
     */
    public List<Lawyer> selectLawyer();
    /**
     * 创建律师档案
     * @param lawyer 包含律师信息的对象
     * @return 创建成功返回1,否则返回0
     */
    public int insertLawyer(Lawyer lawyer);
}
